/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package matricules;

import java.util.Calendar;
import java.util.GregorianCalendar;

/**
 *
 * @author Monica
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        //Calendar actual = Calendar.getInstance();
//        Date fecha=new Date();
//        SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy");
//        System.out.println("La fecha de hoy es: " + sdf.format(fecha));
//        System.out.println(c.getClass());
//        System.out.println(Calendar.getInstance().getTime());
//        GregorianCalendar cal = new GregorianCalendar();
//        fecha.toString();
//        cal.setTime(fecha);
//cal.getTime();
//System.out.println(cal.getTime());
// String diaS= String.valueOf(dia);
        Calendar c = new GregorianCalendar();
        @SuppressWarnings("static-access")
         int dia = c.get(c.DAY_OF_WEEK);
        @SuppressWarnings("static-access")
         int any = c.get(c.YEAR);      
         String anyS= String.valueOf(any);
         System.out.println(dia);
         System.out.println("any : "+ any);
         System.out.println(Calendar.getInstance().getTime());
         System.out.println("diaSetmana"+ dia);
         System.out.println("");
         String fecha1 = "26/05/1972";
         String nom = "Monica";
         String cognom = "Morral";

        Alumne al = new Alumne();
        al.setNom(nom);
        al.setCognoms(cognom);
        al.setDataNaix(fecha1);
        al.setCurs(anyS);
        switch(dia){
            case(2):al.setEstudis("ESO");break;
            case(3):al.setEstudis("Batxillerat");break;
            case(4): al.setEstudis("CFGM");break;
            case(5):al.setEstudis("CFGS");break;
            case(6):al.setEstudis(null);break;
            case(7):al.setEstudis(null);break;
            case(1):al.setEstudis(null);break;
        }
        System.out.println("Matrícula : \n" + " Nom Alumne :" +al.getNom() + "\n Cognoms Alumne :" +al.getCognoms()+ "\n Data Naixement :" + al.getDataNaix() + " \n Estudis :" + al.getEstudis()+ " \n Curs :" + al.getCurs());       
    }

}
